﻿Public Class GajiFactory
    Public Function CreateGaji(Nip As String, Nama As String, Golongan As String, Presensi As Integer, Lembur As Integer) As Gaji
        Dim utility = New GajiUtil()
        utility.Golongan = Golongan
        utility.Presensi = Presensi
        utility.Lembur = Lembur

        Dim gaji = New Gaji()
        gaji.Nip = Nip
        gaji.Nama = Nama
        gaji.Golongan = Golongan
        gaji.Lembur = Lembur
        gaji.GajiPokok = utility.getGajiPokok
        gaji.GajiLembur = utility.getGajiLembur
        gaji.GajiLemburTotal = utility.getTotalGajiLembur
        gaji.GajiTotal = utility.getTotalGaji
        'gaji.Presensi = Presensi
        'gaji.UangMakanTotal = utility.getTotalUangMakan

        Return gaji
    End Function

End Class
